extends layout

block css
  link(rel="stylesheet", href="/stylesheets/homepage.css")
  link(rel="stylesheet", href="https://cdn.bootcss.com/fullPage.js/2.9.4/jquery.fullpage.min.css")

block content
  div#fullpage
    #menu
    .section(style={
      background: `url("${firstArticle.firstImgSrc}") no-repeat  center ,
    linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.8))`,
    'background-size': 'cover'
    })
      a.text(herf=`/article/${firstArticle.index}`)
        h2 No.#{firstArticle.index} | #{firstArticle.time}
        h1 #{firstArticle.name}
        p #{firstArticle.title}
    .section
      .articles.container
        .info
          p 一天一个分享,电影 | 音乐 | 小故事...
        each article, index in articles
          .article
            .media-body
              h4.media-heading #{article.name}
              small 作者: #{article.author}
              .poster(style={'background-image':`url("${article.firstImgSrc}")`})
              p #{article.title}...
                a.read(href=`/article/${article._id}`) 阅读全文
        //- .article
        //-   .media-body
        //-     h3.media-heading 白夜追凶
        //-     small 作者: 渣斌
        //-     .poster
        //-     p “她这么辛苦种田就是为了每天这么吃啊？”“对啊，人生不就是这样吗！”...
        //-       a.read(href="/article/2") 阅读全文
        .more
          //- a(href="") 阅读更多
block js
  script(src="https://cdn.bootcss.com/fullPage.js/2.9.4/jquery.fullpage.min.js")
  script(src="/javascripts/homepage.js")